
//
//  BottomView.m
//  SYiDaiy
//
//  Created by dllo on 16/9/20.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "BottomView.h"
#import "TAMacro.h"
#import "NewsViewController.h"

@implementation BottomView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _returnButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_returnButton setTitle:@"返回" forState:UIControlStateNormal];
        [_returnButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        _centerButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_centerButton setImage:[UIImage imageNamed:@"ButtonEntryToolOuter"] forState:UIControlStateNormal];
        _leftButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_leftButton setImage:[UIImage imageNamed:@"ButtonEntryToolBack"] forState:UIControlStateNormal];
        [_leftButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        _rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_rightButton setImage:[UIImage imageNamed:@"ButtonEntryToolForward"] forState:UIControlStateNormal];
        [_rightButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [self addSubview:_returnButton];
        [self addSubview:_centerButton];
        [self addSubview:_leftButton];
        [self addSubview:_rightButton];
    }
    return self;
}

- (void)layoutSubviews
{
    _returnButton.frame = CGRectMake(5, 15, 100, 20);
    _centerButton.frame = CGRectMake((SCREEN_WIDTH - 20) / 2 - 15, 5, 64, 40);
    _leftButton.frame = CGRectMake(SCREEN_WIDTH - 80, 15, 20, 20);
    _rightButton.frame = CGRectMake(SCREEN_WIDTH - 60, 15, 20, 10);
}




@end
